package com.jason.system.service.impl;

import com.jason.system.entity.Material;
import com.jason.system.mapper.MaterialMapper;
import com.jason.system.service.MaterialService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author jie
 * @version 1.0
 * success come from self-discipline
 * @date 2021/3/26 21:00
 */
@Service
public class MaterialServiceImpl implements MaterialService {

  @Resource
  MaterialMapper materialMapper;

  @Override
  public Material getMaterial(Integer nid) {
    return materialMapper.getMaterial(nid);
  }

  @Override
  public void insertMaterial(Material material) {
    materialMapper.insertMaterial(material);
  }

  @Override
  public void updateMaterial(Material material) {
    materialMapper.updateMaterial(material);
  }

  @Override
  public void deleteMaterial(Integer mId) {
    materialMapper.deleteMaterial(mId);
  }
}
